<%--
  Created by IntelliJ IDEA.
  User: owen
  Date: 2017/3/16
  Time: 21:39
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<jsp:include page="side.jsp"/>
<jsp:include page="easyui.jsp"/>

<c:set var="BASE" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>查看产品</title>
</head>
<body>
<p>


<div class="easyui-panel" style="text-align: center" >
    <a href="${BASE}/product_show" class="easyui-linkbutton" data-options="toggle:true,group:'g1'">所有产品</a>
<c:forEach var="productType" items="${productTypeList}">
    <a href="${BASE}/product_showByType?typeid=${productType.typeid}" class="easyui-linkbutton" data-options="toggle:true,group:'g1'">${productType.name}</a>
</c:forEach>
</div>

<h1>产品列表</h1>


<table id="tt" class="easyui-datagrid" style="text-align: center" width="100%" >
    <thead>
    <tr>
        <th field="name1" width="100">编号</th>
        <th field="name2" width="200">名称</th>
        <th field="name3" width="50">经手</th>
        <th field="name4" width="100">录入</th>
        <th field="name5" width="30">保修</th>
        <th field="name6" width="100">品牌</th>
        <th field="name7" width="100">价格</th>
        <th field="name8" width="50">备注</th>
        <th field="name9" width="100">操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach  var="product" items="${productList}">
        <tr>
            <td>${product.id}</td>
            <td>${product.name}</td>
            <td>${product.handler}</td>
            <td>${product.time}</td>
            <td>${product.guarantee}</td>
            <td>${product.brand}</td>
            <td>${product.price}</td>
            <td>${product.remark}</td>
            <td>
                <a href="${BASE}/product_edit?id=${product.id}">编辑</a>
                <a href="${BASE}/product_delete?id=${product.id}">删除</a>
            </td>
        </tr>
    </c:forEach>

    </tbody>
</table>
</body>
</html>
